<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>社交网站 - 多样式隐私协议弹窗</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
  
  <style>
    /* 基础样式 */
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      background-color: #f8fafc;
      padding-top: 56px;
      transition: background-color 0.3s;
    }
    
    .container {
      max-width: 540px;
      margin: 0 auto;
      padding: 0 15px;
    }
    
    /* 顶部导航 */
    .main-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 56px;
      background-color: white;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
      z-index: 1000;
      display: flex;
      align-items: center;
      padding: 0 15px;
      transition: all 0.3s;
    }
    
    .logo {
      font-size: 20px;
      font-weight: 700;
      color: #0d6efd;
      text-decoration: none;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: color 0.3s;
    }
    
    /* 内容区域 */
    .content {
      padding: 20px 0;
    }
    
    .card {
      background-color: white;
      border-radius: 12px;
      padding: 15px;
      margin-bottom: 15px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.05);
      transition: all 0.3s;
    }
    
    .btn {
      padding: 10px 20px;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 500;
      border: none;
      cursor: pointer;
      transition: all 0.3s;
    }
    
    .btn-primary {
      background-color: #0d6efd;
      color: white;
    }
    
    /* 弹窗背景 */
    .modal-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0,0,0,0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1050;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s;
    }
    
    .modal-backdrop.active {
      opacity: 1;
      visibility: visible;
    }
    
    /* 弹窗容器 */
    .modal-container {
      background-color: white;
      border-radius: 16px;
      width: 90%;
      max-width: 500px;
      max-height: 80vh;
      overflow: hidden;
      transform: translateY(20px) scale(0.98);
      transition: all 0.3s;
    }
    
    .modal-backdrop.active .modal-container {
      transform: translateY(0) scale(1);
    }
    
    /* 弹窗头部 */
    .modal-header {
      padding: 18px 20px;
      border-bottom: 1px solid #e2e8f0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: all 0.3s;
    }
    
    .modal-title {
      font-size: 18px;
      font-weight: 600;
      margin: 0;
      transition: color 0.3s;
    }
    
    .close-btn {
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s;
    }
    
    /* 弹窗内容 */
    .modal-body {
      padding: 20px;
      overflow-y: auto;
      max-height: calc(80vh - 140px);
      transition: all 0.3s;
    }
    
    .policy-section {
      margin-bottom: 15px;
    }
    
    .policy-section h4 {
      font-size: 16px;
      margin-bottom: 8px;
      transition: color 0.3s;
    }
    
    .policy-section p {
      font-size: 14px;
      line-height: 1.6;
      margin-bottom: 10px;
      transition: color 0.3s;
    }
    
    /* 弹窗底部 */
    .modal-footer {
      padding: 15px 20px;
      border-top: 1px solid #e2e8f0;
      display: flex;
      gap: 10px;
      transition: all 0.3s;
    }
    
    .modal-footer .btn {
      flex: 1;
      padding: 12px;
      font-size: 16px;
    }
    
    .btn-accept {
      background-color: #0d6efd;
      color: white;
    }
    
    .btn-decline {
      background-color: #f1f5f9;
      color: #64748b;
    }
    
    /* 样式切换器 */
    .style-switcher {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 1001;
      background-color: white;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      padding: 10px;
      border: 1px solid #e9ecef;
      transition: all 0.3s;
    }
    
    .switch-label {
      font-size: 13px;
      margin-bottom: 8px;
      display: block;
      font-weight: 500;
      transition: color 0.3s;
    }
    
    .style-options {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    
    .style-btn {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      border: 2px solid transparent;
      cursor: pointer;
      transition: all 0.2s;
    }
    
    .style-btn.active {
      border-color: #0d6efd;
      transform: scale(1.1);
    }
    
    /* 提示框 */
    .toast {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      background-color: rgba(0,0,0,0.8);
      color: white;
      border-radius: 8px;
      padding: 10px 15px;
      font-size: 14px;
      z-index: 10000;
      display: none;
    }
    
    /* 样式1 - 经典蓝 */
    .style-1 .modal-header {
      border-bottom-color: #e0e7ff;
    }
    
    .style-1 .modal-footer {
      border-top-color: #e0e7ff;
    }
    
    .style-1 .modal-title,
    .style-1 .policy-section h4 {
      color: #1e40af;
    }
    
    .style-1 .btn-accept {
      background-color: #0d6efd;
    }
    
    .style-1 .style-btn:nth-child(1) {
      background-color: #0d6efd;
    }
    
    /* 样式2 - 商务灰 */
    .style-2 .modal-container {
      border-radius: 12px;
    }
    
    .style-2 .modal-header,
    .style-2 .modal-footer {
      background-color: #f8fafc;
      border-color: #e2e8f0;
    }
    
    .style-2 .modal-title,
    .style-2 .policy-section h4 {
      color: #1e293b;
    }
    
    .style-2 .btn-accept {
      background-color: #334155;
    }
    
    .style-2 .style-btn:nth-child(2) {
      background-color: #64748b;
    }
    
    /* 样式3 - 深色模式 */
    .style-3 {
      background-color: #0f172a;
    }
    
    .style-3 .main-header {
      background-color: #1e293b;
    }
    
    .style-3 .logo {
      color: #93c5fd;
    }
    
    .style-3 .card {
      background-color: #1e293b;
      color: #f8fafc;
      box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .style-3 .modal-container {
      background-color: #1e293b;
      color: #f8fafc;
    }
    
    .style-3 .modal-header,
    .style-3 .modal-footer {
      border-color: #334155;
    }
    
    .style-3 .modal-title,
    .style-3 .policy-section h4 {
      color: #e2e8f0;
    }
    
    .style-3 .close-btn {
      color: #94a3b8;
    }
    
    .style-3 .close-btn:hover {
      background-color: #334155;
      color: white;
    }
    
    .style-3 .btn-accept {
      background-color: #3b82f6;
    }
    
    .style-3 .btn-decline {
      background-color: #334155;
      color: #e2e8f0;
    }
    
    .style-3 .style-switcher {
      background-color: #1e293b;
      border-color: #334155;
    }
    
    .style-3 .switch-label {
      color: #e2e8f0;
    }
    
    .style-3 .style-btn:nth-child(3) {
      background-color: #1e293b;
      border: 1px solid #60a5fa;
    }
    
    /* 样式4 - 圆角卡片 */
    .style-4 .modal-container {
      border-radius: 24px;
    }
    
    .style-4 .modal-header {
      border-bottom: none;
      padding-top: 25px;
    }
    
    .style-4 .modal-footer {
      border-top: none;
      padding-bottom: 25px;
    }
    
    .style-4 .modal-title,
    .style-4 .policy-section h4 {
      color: #dc2626;
    }
    
    .style-4 .btn-accept {
      background-color: #dc2626;
    }
    
    .style-4 .style-btn:nth-child(4) {
      background-color: #fef2f2;
      border-color: #dc2626;
    }
    
    /* 样式5 - 简约线条 */
    .style-5 .modal-container {
      box-shadow: 0 0 0 1px #e2e8f0;
      border-radius: 8px;
    }
    
    .style-5 .modal-header,
    .style-5 .modal-footer {
      padding: 15px;
    }
    
    .style-5 .modal-title,
    .style-5 .policy-section h4 {
      color: #475569;
      font-weight: 500;
    }
    
    .style-5 .btn-accept {
      background-color: #475569;
    }
    
    .style-5 .btn-decline {
      background-color: transparent;
      border: 1px solid #e2e8f0;
    }
    
    .style-5 .style-btn:nth-child(5) {
      background-color: #e2e8f0;
    }
  </style>
</head>
<body class="style-1">
  <!-- 样式切换器 -->
  <div class="style-switcher">
    <span class="switch-label">选择样式</span>
    <div class="style-options">
      <button class="style-btn active" data-style="1" title="经典蓝"></button>
      <button class="style-btn" data-style="2" title="商务灰"></button>
      <button class="style-btn" data-style="3" title="深色模式"></button>
      <button class="style-btn" data-style="4" title="圆角卡片"></button>
      <button class="style-btn" data-style="5" title="简约线条"></button>
    </div>
  </div>
  
  <!-- 顶部导航 -->
  <header class="main-header">
    <a href="#" class="logo">
      <i class="fa fa-connectdevelop"></i>
      <span>社交圈</span>
    </a>
  </header>
  
  <div class="container">
    <!-- 内容区域 -->
    <div class="content">
      <div class="card">
        <h3>用户隐私设置</h3>
        <p>为了提供更好的服务，我们需要获取一些必要的用户信息。请阅读并同意我们的隐私政策。</p>
        <button class="btn btn-primary" id="openPolicyBtn">查看隐私协议</button>
      </div>
      
      <div class="card">
        <h3>账号安全中心</h3>
        <p>管理您的个人信息和隐私设置，保护账号安全。</p>
      </div>
    </div>
  </div>
  
  <!-- 隐私协议弹窗 -->
  <div class="modal-backdrop" id="policyModal">
    <div class="modal-container">
      <div class="modal-header">
        <h3 class="modal-title">隐私政策</h3>
        <button class="close-btn" id="closeBtn">
          <i class="fa fa-times"></i>
        </button>
      </div>
      
      <div class="modal-body">
        <div class="policy-section">
          <h4>1. 信息收集与使用</h4>
          <p>我们收集您在注册和使用本服务时提供的个人信息，包括但不限于用户名、邮箱地址、手机号码等，用于为您提供服务和改善用户体验。</p>
        </div>
        
        <div class="policy-section">
          <h4>2. 信息存储与保护</h4>
          <p>您的个人信息将被安全存储，并采取严格的技术和管理措施防止未经授权的访问、使用或泄露。</p>
        </div>
        
        <div class="policy-section">
          <h4>3. 信息共享与披露</h4>
          <p>我们不会向第三方出售您的个人信息，但在法律法规要求或保护我们合法权益的情况下，可能会披露必要的信息。</p>
        </div>
        
        <div class="policy-section">
          <h4>4. 您的权利</h4>
          <p>您有权访问、更正或删除您的个人信息，也可以随时注销您的账号。请通过设置页面或联系客服行使这些权利。</p>
        </div>
        
        <div class="policy-section">
          <h4>5. 政策更新</h4>
          <p>本隐私政策可能会不时更新，任何变更将在网站上公布，并在公布后生效。建议您定期查看本政策。</p>
        </div>
      </div>
      
      <div class="modal-footer">
        <button class="btn btn-decline" id="declineBtn">拒绝</button>
        <button class="btn btn-accept" id="acceptBtn">同意</button>
      </div>
    </div>
  </div>
  
  <!-- 提示框 -->
  <div class="toast" id="toast"></div>
  
  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 获取元素
    const policyModal = document.getElementById('policyModal');
    const openPolicyBtn = document.getElementById('openPolicyBtn');
    const closeBtn = document.getElementById('closeBtn');
    const acceptBtn = document.getElementById('acceptBtn');
    const declineBtn = document.getElementById('declineBtn');
    const styleBtns = document.querySelectorAll('.style-btn');
    const toast = document.getElementById('toast');
    
    // 打开隐私协议弹窗
    openPolicyBtn.addEventListener('click', function() {
      policyModal.classList.add('active');
      document.body.style.overflow = 'hidden'; // 防止背景滚动
    });
    
    // 关闭弹窗
    function closeModal() {
      policyModal.classList.remove('active');
      document.body.style.overflow = ''; // 恢复滚动
    }
    
    closeBtn.addEventListener('click', closeModal);
    
    // 点击背景关闭弹窗
    policyModal.addEventListener('click', function(e) {
      if (e.target === policyModal) {
        closeModal();
      }
    });
    
    // 同意按钮
    acceptBtn.addEventListener('click', function() {
      closeModal();
      showToast('您已同意隐私政策');
    });
    
    // 拒绝按钮
    declineBtn.addEventListener('click', function() {
      closeModal();
      showToast('您已拒绝隐私政策，部分功能可能受限');
    });
    
    // 切换样式
    styleBtns.forEach(btn => {
      btn.addEventListener('click', function() {
        // 移除所有活跃状态
        styleBtns.forEach(b => b.classList.remove('active'));
        document.body.className = '';
        
        // 添加当前样式
        this.classList.add('active');
        const style = this.getAttribute('data-style');
        document.body.classList.add(`style-${style}`);
        
        showToast(`已切换到${this.title}样式`);
      });
    });
    
    // 显示提示
    function showToast(message) {
      toast.textContent = message;
      toast.style.display = 'block';
      
      setTimeout(() => {
        toast.style.display = 'none';
      }, 2000);
    }
  </script>
</body>
</html>
